﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/Layouts/Admin.Master" AutoEventWireup="true"
    CodeBehind="UserBank.aspx.cs" Inherits="MLM.AdminCP.Pages.UserBank" meta:resourcekey="PageResource1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Label ID="lbUserID" runat="server" Text="User Bank Account Manager" 
        meta:resourcekey="lbUserIDResource1"></asp:Label>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <telerik:RadGrid ID="RadUserBankGrid" runat="server" AllowFilteringByColumn="True"
        DataSourceID="GroupUserBankEds" AllowPaging="True" AllowSorting="True" GridLines="None"
        ShowGroupPanel="True"  AllowAutomaticInserts="True" AllowAutomaticUpdates="True"
        AllowAutomaticDeletes="True" ShowFooter="True" ShowStatusBar="True" 
        meta:resourcekey="RadUserBankGridResource1">
        <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True">
            <Selecting AllowRowSelect="True" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
        <MasterTableView AutoGenerateColumns="False" DataKeyNames="UserBankID" DataSourceID="GroupUserBankEds"
            ShowHeader="true" ShowHeadersWhenNoRecords="true" AllowAutomaticInserts="true"
            CommandItemDisplay="TopAndBottom">
            <%--<MasterTableView ShowFooter="false" DataKeyNames="ProductID" EditMode="InPlace" CommandItemDisplay="TopAndBottom">--%>
            <CommandItemSettings ShowAddNewRecordButton="true" ShowRefreshButton="true">
                <%--ExportToPdfText="Export to Pdf">--%></CommandItemSettings>
            <RowIndicatorColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn DataField="UserBankID" DataType="System.Int64" HeaderText="UserBankID"
                    ReadOnly="True" SortExpression="UserBankID" UniqueName="UserBankID" 
                    meta:resourcekey="GridBoundColumnResource1">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="UserID" HeaderText="UserID" SortExpression="UserID"
                    UniqueName="UserID" DataType="System.Int64" 
                    meta:resourcekey="GridBoundColumnResource2">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="AccountName" HeaderText="AccountName" SortExpression="AccountName"
                    UniqueName="AccountName" meta:resourcekey="GridBoundColumnResource3">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="BankCode" HeaderText="BankCode" SortExpression="BankCode"
                    UniqueName="BankCode" meta:resourcekey="GridBoundColumnResource4">
                </telerik:GridBoundColumn>
                <%--<telerik:GridBoundColumn DataField="AccountID" HeaderText="AccountID" SortExpression="AccountID"
                    UniqueName="AccountID">
                </telerik:GridBoundColumn>--%>
                <telerik:GridBoundColumn DataField="BankName" HeaderText="BankName" SortExpression="BankName"
                    UniqueName="BankName" meta:resourcekey="GridBoundColumnResource5">
                </telerik:GridBoundColumn>
                <telerik:GridEditCommandColumn ButtonType="ImageButton" 
                    UniqueName="EditCommandColumn" 
                    meta:resourcekey="GridEditCommandColumnResource1">
                    <ItemStyle CssClass="MyImageButton"></ItemStyle>
                </telerik:GridEditCommandColumn>
                <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete"
                    UniqueName="DeleteColumn" meta:resourcekey="GridButtonColumnResource1">
                    <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle>
                </telerik:GridButtonColumn>
            </Columns>
            <EditFormSettings EditFormType="Template">
                <EditColumn UniqueName="EditCommandColumn1">
                </EditColumn>
                <FormTemplate>
                    <table id="Table2" style="border-collapse: collapse; padding-left: 20">
                        <tr class="EditFormHeader" style="height: 30px">
                            <td style="font-size: small" colspan="2">
                                <b><asp:Label ID="Label1" runat="server" Text="Bank Information" 
                                    meta:resourcekey="Label1Resource1"></asp:Label></b>
                            </td>
                        </tr>
                        <tr>
                            <td class="titlename">
                                <asp:Label ID="lbUserID" runat="server" Text="UserID:" 
                                    meta:resourcekey="lbUserIDResource2"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadComboBox CssClass="rancombox" runat="server" ID="RadComboBox1" DataTextField="UserID"
                                    DataValueField="UserID" DataSourceID="GroupUserSettingEds" SelectedValue='<%# Bind("UserID") %>'
                                    AutoPostBack="True" EnableLoadOnDemand="True" 
                                    meta:resourcekey="RadComboBox1Resource1">
                                    <HeaderTemplate>
                                        <ul>
                                            <li style="list-style-type: none" class="col1">User ID</li>
                                        </ul>
                                    </HeaderTemplate>
                                </telerik:RadComboBox>
                            </td>
                            <td class="titlename">
                                <asp:Label ID="lbAccountName" runat="server" Text="AccountName:" 
                                    meta:resourcekey="lbAccountNameResource1"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadTextBox CssClass="radtextbox" ID="RadTextBox1" runat="server" 
                                    Text='<%# Bind("AccountName") %>' LabelCssClass="" 
                                    meta:resourcekey="RadTextBox1Resource1">
                                </telerik:RadTextBox>
                                <asp:RequiredFieldValidator ID="TextBoxRequiredFieldValidator" runat="server" Display="Dynamic"
                                    ControlToValidate="RadTextBox1" 
                                    ErrorMessage="The textbox can not be empty!" 
                                    meta:resourcekey="TextBoxRequiredFieldValidatorResource1"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr style="height: 30px">
                            <td class="titlename">
                                <asp:Label ID="lbAccountNumber" runat="server" Text="AccountNumber:" 
                                    meta:resourcekey="lbAccountNumberResource1"></asp:Label>
                            </td>
                            <td style="width: 30">
                                <telerik:RadTextBox CssClass="radtextbox" ID="RadTextBox2" runat="server" 
                                    Text='<%# Bind("AccountNumber") %>' LabelCssClass="" 
                                    meta:resourcekey="RadTextBox2Resource1">
                                </telerik:RadTextBox>
                            </td>
                            <td class="titlename">
                                <asp:Label ID="BankCode" runat="server" Text="BankCode:" 
                                    meta:resourcekey="BankCodeResource1"></asp:Label>
                            </td>
                            <td>
                                <telerik:RadTextBox CssClass="radtextbox" ID="RadTextBox3" runat="server" 
                                    Text='<%# Bind("BankCode") %>' LabelCssClass="" 
                                    meta:resourcekey="RadTextBox3Resource1">
                                </telerik:RadTextBox>
                            </td>
                        </tr>
                        <tr style="height: 30px">
                            <td>
                                <asp:Label ID="lbSWIFTCode" runat="server" Text="SWIFTCode:" 
                                    meta:resourcekey="lbSWIFTCodeResource1"></asp:Label>
                            </td>
                            <td style="width: 30">
                                <telerik:RadTextBox CssClass="radtextbox" ID="RadTextBox4" runat="server" 
                                    Text='<%# Bind("SWIFTCode") %>' LabelCssClass="" 
                                    meta:resourcekey="RadTextBox4Resource1">
                                </telerik:RadTextBox>
                            </td>
                            <td style="padding-left: 20; padding-right: 30">
                               <asp:Label ID="lbBankName" runat="server" Text="Bank Name:" 
                                    meta:resourcekey="lbBankNameResource1"></asp:Label>
                            </td>
                            <td style="width: 50">
                                <telerik:RadTextBox CssClass="radtextbox" ID="RadTextBox5" runat="server" 
                                    Text='<%# Bind("BankName") %>' LabelCssClass="" 
                                    meta:resourcekey="RadTextBox5Resource1">
                                </telerik:RadTextBox>
                            </td>
                        </tr>
                        <tr style="height: 30px">
                            <td>
                                <asp:Label ID="lbAccountID" runat="server" Text="AccountID:" 
                                    meta:resourcekey="lbAccountIDResource1"></asp:Label>
                            </td>
                            <td style="width: 30">
                                <telerik:RadTextBox CssClass="radtextbox" ID="RadTextBox6" runat="server" 
                                    Text='<%# Bind("AccountID") %>' LabelCssClass="" 
                                    meta:resourcekey="RadTextBox6Resource1">
                                </telerik:RadTextBox>
                            </td>
                            <td style="padding-left: 20; padding-right: 30">
                                <asp:Label ID="BankName" runat="server" Text="BICCode:" 
                                    meta:resourcekey="BankNameResource2"></asp:Label>
                            </td>
                            <td style="width: 50">
                                <telerik:RadTextBox CssClass="radtextbox" ID="RadTextBox7" runat="server" 
                                    Text='<%# Bind("BICCode") %>' LabelCssClass="" 
                                    meta:resourcekey="RadTextBox7Resource1">
                                </telerik:RadTextBox>
                            </td>
                        </tr>
                        <tr style="height: 30px">
                            <td>
                                <asp:Label ID="lbIBANCode" runat="server" Text="IBANCode:" 
                                    meta:resourcekey="lbIBANCodeResource1"></asp:Label>
                            </td>
                            <td style="width: 30">
                                <telerik:RadTextBox CssClass="radtextbox" ID="RadTextBox8" runat="server" 
                                    Text='<%# Bind("IBANCode") %>' LabelCssClass="" 
                                    meta:resourcekey="RadTextBox8Resource1">
                                </telerik:RadTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="padding-bottom: 10; padding-top: 10" colspan="2">
                                <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    runat="server" 
                                    CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' 
                                    meta:resourcekey="btnUpdateResource1">
                                </asp:Button>&nbsp;
                                <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                    CommandName="Cancel" meta:resourcekey="btnCancelResource1"></asp:Button>
                            </td>
                        </tr>
                    </table>
                </FormTemplate>
            </EditFormSettings>
        </MasterTableView>
        <%--<HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default">
        </HeaderContextMenu>--%>
        <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Office2007">
        </HeaderContextMenu>
    </telerik:RadGrid>
    <asp:EntityDataSource ID="GroupUserSettingEds" runat="server" ConnectionString="name=MLMDataContext"
        DefaultContainerName="MLMDataContext" EnableDelete="True" EnableFlattening="False"
        EnableInsert="True" EnableUpdate="True" EntitySetName="Users" 
        EntityTypeFilter="" Select="">
    </asp:EntityDataSource>
    <asp:EntityDataSource ID="GroupUserBankEds" runat="server" ConnectionString="name=MLMDataContext"
        DefaultContainerName="MLMDataContext" EnableDelete="True" EnableFlattening="False"
        EnableInsert="True" EnableUpdate="True" EntitySetName="UserBanks" 
        EntityTypeFilter="UserBank" Select="">
    </asp:EntityDataSource>
</asp:Content>
